<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>级联数据列表</title>

    <link href="/Application/Admin/Public/css/base.css" rel="stylesheet">
    <link rel="stylesheet" href="/Application/Admin/Public/custom/uimaker/easyui.css">
    <link rel="stylesheet" type="text/css" href="/Application/Admin/Public/custom/uimaker/icon.css">
    <link rel="stylesheet" href="/Application/Admin/Public/css/providers.css">
    <style type="text/css">
        .summary {
            border: 2px solid #ccc;
            border-top: #1da02b 1px solid;
            padding: 8px;
        }
        .summary form >div{
            margin-top: 20px;
           /* display: inline-block;
            width: 49%;*/
        }
        .summary label{
            width: 150px;
            text-align: right;
            display: inline-block;
            margin-right: 20px;
        }

        .addimg{
          margin-right: 10px;
        }
        .pic ul{
          margin: 10px 24px;
        }
        .pic li{
          list-style: none;
          float: left;
          position: relative;
          margin: 10px 5px;
          border-radius: 5px;
          overflow: hidden;
          height: 100px;
          transition: 0.5s;
        }
        .pic li:hover{
          box-shadow: 1px 1px 15px 3px #333;
          transition: 0.5s
        }
        .pic li:hover .del{
          display: block;
        }
        .del{
          position: absolute;height: 20px;width: 20px;border-radius: 10px;background: #fff;border:1px solid #333;right: 0px;top: 0px;text-align: center;line-height: 20px;cursor: pointer;display: none;
        }
        .minp{height: 24px;border:1px solid #aaa;text-indent: 5px}
        hr{background: #5bbc9a;border: 0;height: 1px;margin: 30px 30px 0;}
        .onel{display:inline-block;width:30%;}
        .binfo li{list-style: none;float: left;width: 40%;}
        .binfo li div{margin-top: 20px;}
        .myImg {
            border-radius: 5px;
            cursor: pointer;
            transition: 0.3s;
            margin-left: 150px;
            margin-top: 10px;
        }

        .myImg:hover {opacity: 0.7;}

        .modal {
            display: none;
            position: fixed;
            z-index: 1;
            padding-top: 100px;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgb(0,0,0);
            background-color: rgba(0,0,0,0.7);
        }

        .modal-content {
            margin: auto;
            display: block;
            /*width: 100%;*/
            max-width: 600px;
        }

        #caption {
            margin: auto;
            display: block;
            width: 80%;
            max-width: 700px;
            text-align: center;
            color: #ccc;
            padding: 10px 0;
            height: 150px;
        }

        .modal-content, #caption {
            -webkit-animation-name: zoom;
            -webkit-animation-duration: 0.6s;
            animation-name: zoom;
            animation-duration: 0.6s;
        }

        @-webkit-keyframes zoom {
            from {-webkit-transform: scale(0)}
            to {-webkit-transform: scale(1)}
        }

        @keyframes zoom {
            from {transform: scale(0.1)}
            to {transform: scale(1)}
        }

        .close {
            /*position: absolute;*/
            top: 15px;
            right: 35px;
            color: #f1f1f1;
            font-size: 40px;
            font-weight: bold;
            transition: 0.3s;
        }

        .close:hover,
        .close:focus {
            color: #bbb;
            text-decoration: none;
            cursor: pointer;
        }

        @media only screen and (max-width: 700px){
            .modal-content {
                width: 100%;
            }
        }

    </style>

</head>
<body>

<div class="container" style="padding:10px 30px;">
    <a href="<?php echo U('Basescore/index');?>" class="easyui-linkbutton" iconCls="icon-back" >返回</a>
</div>


<div class="contractinfo-table">
  <div id="myModal" class="modal close">
      <!--<span >×</span>-->
      <img class="modal-content" id="imgInfo">
      <div id="caption"></div>
  </div>
<div class="summary">
    
     <form id="addpic" method="post" novalidate="novalidate" enctype="multipart/form-data" style='margin-top: 30px;'>
      <input type="hidden" id="action" name="action">
   <!--  <form id="addpic" method="post" novalidate="novalidate" action='<?php echo U("Prop/editImg");?>' enctype="multipart/form-data" style='margin-top: 30px;'>
         <button type="submit">tijao</button> -->
       <div class="binfo">
          <ul>
          <li style="border-right: 1px solid #5bbc9a">
        <input type="hidden" value="<?php echo ($data["baseid"]); ?>" name='baseid'></input>
        <div><label>底分数量:</label><input value="<?php echo ($data["basenum"]); ?>" type='text' name='basenum' class='easyui-textbox minp' data-options="required:true" style="height:28px" /></div>
        </li>
        <li>
        <div><label>排序:</label><input class="easyui-numberspinner minp" value="<?php echo ($data["orderid"]); ?>" name="orderid" data-options="increment:1,required:true" style="height:30px;"></div>
        <div><label>价格:</label><input  class='minp' value="<?php echo ($data["cnum"]); ?>" type='text' name='cnum' data-options="required:true" class="easyui-textbox" /></div>
        </li>
          <div style="clear: both;"></div>
          </ul>
        </div>
        <hr/>
        <div class="binfo">
          <ul>
          <li style="border-right: 1px solid #5bbc9a">
            <div><label>游戏ID:</label>

              <select id="gameid" name="gameid" required='true' style="width: 153px;height: 30px;">
                  <?php if(is_array($game_id)): $i = 0; $__LIST__ = $game_id;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i; if($vo["gameid"] == $data[gameid]): ?><option value="<?php echo ($vo["gameid"]); ?>" selected>ID:<?php echo ($vo["gameid"]); ?>,<?php echo ($vo["game"]); ?></option>
                        <?php else: ?>  
                      <option value="<?php echo ($vo["gameid"]); ?>">ID:<?php echo ($vo["gameid"]); ?>,<?php echo ($vo["game"]); ?></option><?php endif; endforeach; endif; else: echo "" ;endif; ?> 
              </select>
          </div>


          </li>
           <li>

              <div><label>哪种货币购买:</label>
              <select id="currencyid" name="currencyid" required='true' style="width: 153px;height: 30px;">
              <option value="">请选择</option> 
                  <?php if(is_array($currency_id)): $i = 0; $__LIST__ = $currency_id;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i; if($vo["curyid"] == $data[currencyid]): ?><option value="<?php echo ($vo["curyid"]); ?>" selected>ID:<?php echo ($vo["curyid"]); ?>,<?php echo ($vo["currency"]); ?></option>
                        <?php else: ?>  
                      <option value="<?php echo ($vo["curyid"]); ?>">ID:<?php echo ($vo["curyid"]); ?>,<?php echo ($vo["currency"]); ?></option><?php endif; endforeach; endif; else: echo "" ;endif; ?> 
              </select>


          </div>
          </li>
          <div style="clear: both;"></div>
          </ul>
        </div>
          <hr/>
          <div class="binfo">
          <ul>
          <li style="border-right: 1px solid #5bbc9a">
          <div><label>道具ID:</label><span><?php echo ($data["itemid"]); ?></span></div>
          <div><label>操作人:</label><span><?php echo ($data["admin"]); ?></span></div>
          <div><label>创建时间:</label><span><?php echo ($data["createtime"]); ?></span></div>
          <div><label>修改时间:</label><span><?php echo ($data["updatetime"]); ?></span></div>
          <div><label>ID:</label><span><?php echo ($data["id"]); ?></span></div>

          </li>

          <div style="clear: both;"></div>
          </ul>
        </div>
    </form>
    
    <hr/>
    <div id="dlg-buttons">
      <a style="margin: 10px 50px;" href="javascript:void(0)" class="easyui-linkbutton" id="btnAddOK" iconcls="icon-ok" onclick="btnAddOK()">保存</a>
    </div>
  </div>

</div>


<script type="text/javascript" src="/Application/Admin/Public/custom/jquery.min.js"></script>
<script type="text/javascript" src="/Application/Admin/Public/custom/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/Application/Admin/Public/custom/easyui-lang-zh_CN.js"></script>
<script>


$("input").blur(function(){
  $(this).css("border","#aaa solid 1px");
});

$("input").focus(function(){
  $(this).css("border","#1da02b  solid 1.5px");
});

  function btnAddOK() {
        $('#addpic').form('submit',{
            url: '<?php echo U("Prop/editImg");?>',
            onSubmit: function(){
                return $(this).form('validate');
            },
            success: function(result){
              if(result>0){
                $.messager.alert('提示','修改成功!','info',function(){
                    reload();
                });
              }else{
                $.messager.show({
                    title: '错误提示',
                    msg: '修改失败'
                });
              }    
            }
        });
    }

    $('.del').click(function(){
        $(this).parent().remove();
    });



    // 修改货比选项
     $("#gameid").change(function(){
      var gameid=$(this).val();
      $("#currencyid").empty(); 
      // alert(gameid);
      $.ajax({
        url:'<?php echo U("Prop/cury");?>',
        data:{
          gameid:gameid,
        },
        dataType:"json",
        success:function(data){
          var cury = data.cury;
          var option=$("<option></option>");
          $(option).val("0");
          $(option).html("请选择");
          $("#currencyid").html(option);
          for(var i in cury){
            var option=$("<option></option>");
            $(option).val(cury[i]['curyid']);
            $(option).html('ID:'+cury[i]['curyid']+','+cury[i]['currency']);
            $("#currencyid").append(option);
          }
        }
      });
    });









</script>
</body>
</html>